#ifndef _ANSELMU_H_H
#define _ANSELMU_H_H

#include <stdio.h>
#include <SDL/SDL.h>
#include <SDL/SDL_rotozoom.h>
#include <SDL/SDL_ttf.h>
#include <math.h>
#include "utils.h"

#define MARGIN 10
#define GOAL_WIDTH  10
#define GOAL_HEIGHT 200
#define RACKET_DISTANCE 5
#define RACKET_HEIGHT 90
#define RACKET_WIDTH 10
#define BALL_RADIUS 12

typedef struct
{
    int x, y, w, h;
}Racket;

typedef struct
{
    int x, y, w, h;
}Limits;

typedef struct
{
    float x, y, inc_x, inc_y, speed, angle, radius;
}Ball;

typedef struct
{
    int x, y, w, h;
}Goal;

extern Racket racket1;
extern Racket racket2;
extern Ball   ball;
extern Goal   goal1;
extern Goal   goal2;
extern Limits limits;

void initAnselmu();
void loadSounds();
void drawRacket(Racket racket, unsigned int color);
void drawGoal(Goal goal, unsigned int color);
void drawBall(unsigned int color);
void drawLimits(unsigned int color);
void drawAnselmu();
void resetBall(Ball *ball);
void randomizeBall(Ball *ball);
void calcBallInc(Ball *ball);
void moveBall(Ball *ball);
void moveAnselmu();
void moveRacket(Racket *racket, int distance);
void ballLimitsCollision(Ball *ball);
void cleanSounds();



#endif
